package com.itheima;

import com.itheima.pojo.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author huyoufu <https://github.com/huyoufu>
 * @TIME 2020-08-05 09:22
 * @description 有参构造 注入属性演示
 */
public class Test01 {


    public static void main(String[] args) {

        //创建spring容器对象 给出配置文件的地址
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");

        //获取名字叫做 user01对象

        User user01 = (User) context.getBean("user01");

        System.out.println("获取到对象了:"+user01);


    }


}
